﻿using System.Drawing;
using System.IO;

namespace ClipboardHistory.Net.Utils
{
    class Utils
    {
        public static byte[] imageToByteArray(Image imageIn)
        {
            var ms = new MemoryStream();
            imageIn.Save(ms, imageIn.RawFormat);
            return ms.ToArray();
        }
        public static Image byteArrayToImage(byte[] byteArrayIn)
        {
            var ms = new MemoryStream(byteArrayIn);
            var returnImage = Image.FromStream(ms);
            return returnImage;
        }
    }

    public enum ClipboardDataType
    {
        Text = 1,
        Image = 2,
        FileDropList = 3,
        Audio = 4
    }
}
